package com.wedimob.bo.test;

import com.wedimob.bo.SerializableBO;

class SerializableObject extends SerializableBO<SerializableObject> {
	private Integer id;
	private String name;

	public SerializableObject(Integer id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;

		if (!(obj instanceof SerializableObject))
			return false;

		SerializableObject otherObj = (SerializableObject) obj;
		return id.equals(otherObj.getId()) && name.equals(otherObj.getName());

	}

	@Override
	public int hashCode() {
		return id.hashCode() * 71 + 9 * name.hashCode();
	}

}